<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="com.ahp.bean.Module"%>
<%@page import="com.ahp.bean.User"%>
<%@ include file="../include/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="<%=path%>/style/style_manage.css" type="text/css"></link>
<title>用户列表</title>
</head>
<body>
<div id="management">
<h1 style="position: relative;">管理页面</h1>
<table border="1" cellpadding="0" cellspacing="0" class="table">
<%
User usr = (User)request.getSession().getAttribute(User.USER_SESSION);
List<Module> list = null;
if(request.getAttribute("list") != null){
	list = (List<Module>)request.getAttribute("list");
}
 %>
	<tbody>
		<tr>
			<th>模板名称</th>
			<th>模板类型</th>
			<th>操作</th>
		</tr>
	<%for(int i =0;i<list.size();i++){
		Module mod = list.get(i);
	 %>
		<tr>
			<td align="center"><a href="<%=path %>/factor/viewFirstFactor.action?id=<%=mod.getModId() %>&modlueName=<%=mod.getName() %>"><%=mod.getName() %></a></td>
			<td align="center"><%if(Module.TYPE_MODULE_DEFAULT.equals(mod.getType())){out.print("默认");}
			else if(Module.TYPE_MODULE_USER.equals(mod.getType())){out.print("自定义");} %></td>
			<td align="center"><%if(User.MANAGER_TYPE.equals(usr.getType())){ %>
			<a href="<%=mod.getModId() %>">删除</a>
			<%}else if(User.USER_TYPE.equals(usr.getType()) && Module.TYPE_MODULE_USER.equals(mod.getType())){
			%>
				<a href="<%=mod.getModId() %>">删除</a>
			<%
			}
			%>
			</td>
			
		</tr>
	<%} %>
	</tbody>
</table>
</div>
<div id="pages">
	${requestScope.pageStr }
</div>
</body>
</html>